package com.liwang.lanouhn.nvshengo.view;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageView;

/**
 * Created by lanouhn on 2016/10/25.
 */
public class RecyclerImageView extends ImageView {


    public RecyclerImageView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public RecyclerImageView(Context context) {
        super(context);
    }


    @Override
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();

//        Drawable d = getDrawable();
//        if (d != null && d instanceof BitmapDrawable) {
//            Bitmap bmp = ((BitmapDrawable) d).getBitmap();
//            if (null != bmp)
//                bmp.recycle();
//            bmp = null;
//        }
        setImageBitmap(null);
//        if (d != null) {
//            d.setCallback(null);
//        }
    }
}
